<!DOCTYPE HTML>
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="../static_pc/assets3/css/bs3/dpl-min.css" rel="stylesheet" type="text/css"/>
    <link href="../static_pc/assets3/css/bs3/bui-min.css" rel="stylesheet" type="text/css"/>
    <!-- <link href="../static_pc/assets/css/dpl-min.css" rel="stylesheet" type="text/css" />
    <link href="../static_pc/assets/css/bui-min.css" rel="stylesheet" type="text/css" /> -->
    <link href="../static_pc/assets/css/page-min.css" rel="stylesheet" type="text/css"/>
    <style>
        /**内容超出 出现滚动条 **/
        .bui-stdmod-body {
            overflow-x: hidden;
            overflow-y: auto;
        }
    </style>
</head>
<body>
<div class="container">
    <!--<div class="row">-->
        <!--<form id="searchForm" class="form-horizontal span24">-->
            <!--<div class="row">-->
                <!--<div class="control-group span8">-->
                    <!--<label class="control-label">题目</label>-->

                    <!--<div class="controls">-->
                        <!--<input type="text" class="control-text" name="key" placeholder="关键字">-->
                        <!--<input type="text" name="aaa" style="display: none;">-->
                    <!--</div>-->
                <!--</div>-->
                <!--<div class="span3 offset">-->
                    <!--<button type="button" id="btnSearch" class="button button-primary">搜索</button>-->
                <!--</div>-->
            <!--</div>-->
        <!--</form>-->
    <!--</div>-->
    <div class="search-grid-container">
        <div id="grid"></div>
    </div>
</div>


<script type="text/javascript" src="../static_pc/common/jquery.min-2.1.3.js"></script>
<script type="text/javascript" src="../static_pc/common/JsUtil.js"></script>
<script type="text/javascript" src="../static_pc/layer/layer.js"></script>
<script type="text/javascript" src="../static_pc/assets/js/bui.js"></script>
<script type="text/javascript" src="../static_pc/assets/js/config.js"></script>
<script type="text/javascript">
    var user_id = __JsUtil.GetQuery("user_id");
    var act_id = __JsUtil.GetQuery("act_id");
    BUI.use(['common/search', 'bui/overlay'], function (Search, Grid, Data, overlay) {
        var Mask = BUI.Mask, Overlay = BUI.Overlay,
            Grid = BUI.Grid,
            columns = [
                {title: '序号', dataIndex: 'seq', elCls: 'center'},
                {title: '题目', dataIndex: 'name', elCls: 'center'},
                {title: '选项', dataIndex: 'answer', elCls: 'center'},
                /*{title: '发布时间', dataIndex: 'gmtCreate', elCls: 'center'},*/
            ],
            store = Search.createStore('../api/userManage/loadUserQuesList', {
                proxy: {
                    save: { //也可以是一个字符串，那么增删改，都会往那么路径提交数据，同时附加参数saveType
                        /* addUrl : '${pageContext.request.contextPath}/admin/addAdm.shtml',
                         updateUrl : '${pageContext.request.contextPath}/admin/updAdm.shtml',
                         removeUrl : '${pageContext.request.contextPath}/admin/delAdm.shtml' */
                    },
                    method: 'POST'
                },
                params: { //配置初始请求的参数
                    userId : user_id,
                    actId : act_id,
                },
                pageIndex: 0,
                pageSize: 20,
                autoSync: true //保存数据后，自动更新
            }),
            gridCfg = Search.createGridCfg(columns, {
                forceFit: true,
                emptyDataTpl: '<div class="centered"><img alt="Crying" src="http://img03.taobaocdn.com/tps/i3/T1amCdXhXqXXXXXXXX-60-67.png"><h2>查询的数据不存在</h2></div>',
                tbar: {
                    items: [
                        /*{text: '<i class="icon-plus"></i>新建', btnCls: 'button button-small', handler: addFunction},*/
                    ]
                },
                loadMask: true, //加载数据时显示屏蔽层
//                plugins: [BUI.Grid.Plugins.CheckSelection] // 插件形式引入多选表格
            });

        var search = new Search({
                store: store,
                gridCfg: gridCfg
            }),
            grid = search.get('grid');

    });
</script>
</body>
</html>  